import request from '@/utils/request'

// 查询楼盘信息列表
export function listInfo(query) {
  return request({
    url: '/housing/info/list',
    method: 'get',
    params: query
  })
}

// 查询楼盘信息详细
export function getInfo(id) {
  return request({
    url: '/housing/info/' + id,
    method: 'get'
  })
}
// 查询省
export function getsheng() {
  return request({
    url: '/housing/info/getsheng/',
    method: 'get'
  })
}
// 查询市
export function getshi(pid) {
  return request({
    url: '/housing/info/getshi/',
    method: 'get',
    params: pid,
  })
}
// 查询县
export function getxian(pid) {
  return request({
    url: '/housing/info/getxian/',
    method: 'get',
    params: pid,
  })
}
// 查询县
export function getuuid() {
  return request({
    url: '/housing/info/getuuid/',
    method: 'get',
  })
}
// 查询地铁
export function getsubway(pid) {
  return request({
    url: '/housing/info/getsubway/',
    method: 'get',
    params: pid,
  })
}
//查询直辖市地铁
export function getzhixiasubway(pid) {
  return request({
    url: '/housing/info/getzhixiasubway/',
    method: 'get',
    params: pid,
  })
}
// 查询商圈
export function getarea(pid) {
  return request({
    url: '/housing/info/getarea/',
    method: 'get',
    params: pid,
  })
}
// 查询楼盘特色
export function getproperty() {
  return request({
    url: '/housing/info/getproperty/',
    method: 'get',
  })
}
// 新增楼盘信息
export function addloupan(data) {
  return request({
    url: '/housing/info/addloupan/',
    method: 'post',
    data: data
  })
}

// 修改楼盘信息
export function updateInfo(data) {
  return request({
    url: '/housing/info',
    method: 'put',
    data: data
  })
}

// 删除楼盘信息
export function delInfo(id) {
  return request({
    url: '/housing/info/' + id,
    method: 'delete'
  })
}
